﻿using System;
using AngleSharp.Dom;
using System.Linq.Expressions;
using WomanMotion.WebApi.Infrastructure.Ioc;
using WomanMotion.WebApi.Model.Dtos.Role;
using WomanMotion.WebApi.Model.Dtos.Users;
using WomanMotion.WebApi.Model.Entitys;
using SqlSugar;
using WomanMotion.WebApi.Infrastructure.DataBaseCommon;
using WomanMotion.WebApi.Model.Dtos.Classify;
using WomanMotion.WebApi.Model.Dtos.Router;

namespace WomanMotion.WebApi.Service.IService
{
    public interface IUsersService : IBaseCRUDService<Users, UserVM, UpdateUserDTO, CreatedUserDTO>, ITransientDependency
    {
        /// <summary>
        /// 更新密码
        /// </summary>
        /// <param name="dto">dto</param>
        /// <returns></returns>
        Task<bool> UPdatePwdAsync(UpdateUserPwdDTO dto);

        /// <summary>
        /// 多表分页查询
        /// </summary>
        /// <param name="pars">查询条件</param>
        /// <returns></returns>
        Task<PageViewBase<List<UserPageVM>>> GetCommonPageListAsync(QueryParameterBase pars);

        /// <summary>
        /// 返回单条多表连接数据
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        Task<UserPageVM> GetCommonFirstAsync(long id);

        /// <summary>
        /// 返回单条多表连接数据
        /// </summary>
        /// <param name="expression">查询where条件</param>
        /// <returns></returns>
        Task<UserPageVM> GetCommonFirstAsync(Expression<Func<UserPageVM, bool>> expression);
        /// <summary>
        /// 返回前端路由
        /// </summary>
        /// <param name="rolecode">角色代码</param>
        /// <returns></returns>
        Task<RouterVM> GetRoute();
    }
}